﻿using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using System.Web;
using System.Web.Mvc;

using Bricks.Business.Service.Impl;
using Bricks.Site.Models;
using Bricks.Business.Models.FlowProcess;
using System.Xml;
using System.Web.Script.Serialization;
using Bricks.Business.Service;
using Bricks.Component.Utils;
using Bricks.Site.Web.CommonUtils;
using Bricks.Component.Utils.Extensions;

namespace Bricks.Site.Web.Controllers
{
    [Export]
    public class ConstructionContractEstimateBillController : BaseController
    {
        [Import]
        public IConstructionContractEstimateBillService ConstructionContractEstimateBillService { get; set; }

        public ActionResult ConstructionContractEstimateBillList(string contractID,string contractStagesID)
        {
            ConstructionContractEstimateView constructionContractEstimateView = new ConstructionContractEstimateView();
            constructionContractEstimateView.ContractID = contractID.ToGuid();
            constructionContractEstimateView.ID = contractStagesID.ToGuid();
            return View(constructionContractEstimateView);
        }

        public ActionResult GetConstructionContractEstimateBillList(string contractStagesID)
        {
            return Json(ConstructionContractEstimateBillService.GetConstructionContractEstimateBillList(contractStagesID.ToGuid()), JsonRequestBehavior.AllowGet);
        }
    }
}